#include<bits/stdc++.h>
using namespace std;

const int MAXN = 1e5 + 10;
int n, ans, mx, a[MAXN], b[MAXN];

int main(){
	cin.tie(0);
	ios::sync_with_stdio(0);
	freopen("duel.in", "r", stdin);
	freopen("duel.out", "w", stdout);
	cin >> n;
	ans = n;
	for(int i = 1, m; i <= n; i ++){
		cin >> m;
		a[m] ++;
		mx = max(m, mx);
	}
	int cnt = 1;
	for(int i = 1; i <= mx; i ++){
		if(a[i] != 0){
			b[cnt] = a[i];
			cnt ++;
		}
	}
	for(int i = 2; i <= cnt; i ++) a[i] = b[i];
	for(int i = 2; i <= cnt; i ++){
		for(int j = i; j <= cnt; j ++){
			if(b[i-1] <= a[j]){
				a[j] -= b[i-1];
				ans -= b[i-1];
				break;
			}
			else{
				b[i-1] -= a[j];
				ans -= a[j];
				a[j] = 0;
			}
		}
	}
	cout << ans << "\n";
	return 0;
}
